package javase2.day03;
/**
 * 整数的读取
 */
import java.io.IOException;
import java.io.RandomAccessFile;

public class Demo5 {
	public static void main(String args[]) throws IOException{
		String file = "raf.dat";
		IOUtils.print(file);
		RandomAccessFile raf = new RandomAccessFile(file, "r");
		raf.seek(3);
		int d1 = raf.read();
		int d2 = raf.read();
		int d3 = raf.read();
		int d4 = raf.read();
		int i = (d1<<24) + (d2<<16) +(d3<<8) + (d4<<0);
		System.out.println(i);
		raf.seek(3);
		i=raf.readInt();
		System.out.println(i);
	}
}
